#/bin/bash

PROJECTS=$HOME/projects
NECTDIR=$PROJECTS/thirdparty/kinect/libfreenect
OPENCVDIR=$HOME/temp/lib
LIBNECT=$NECTDIR/build/lib/libfreenect.a


OPENCV="$OPENCVDIR/libopencv_core.so $OPENCVDIR/libopencv_highgui.so $OPENCVDIR/libopencv_calib3d.so -Wl,-rpath,$OPENCVDIR"

cd src
rm bg
c++ -g -O2 -I$NECTDIR/include -I. *.cpp -o bg -rdynamic -ldl -lm -lpthread -lrt $LIBNECT /lib/libusb-1.0.so.0 $OPENCV
